package com.pk.flink.functions.source;

import com.pk.flink.bean.Access;
import org.apache.flink.api.common.functions.ReduceFunction;

public class AccecssReduceFunction implements ReduceFunction<Access> {

    @Override
    public Access reduce(Access s, Access t1) throws Exception {
        Access access = new Access();
        access.setDomain(s.getDomain());
        access.setTraffic(s.getTraffic() + t1.getTraffic());
        return access;
    }
}
